import redis.clients.jedis.Jedis;

public class RedisDemo {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("localhost", 6379);
        // 新增键值
        jedis.set("city", "Shanghai");
        // 查询并打印值
        System.out.println("city: " + jedis.get("city"));
        jedis.close();
    }
}
